/**
 * 
 */
package fhq.hcmute.modernshopping.fragment;

import android.app.Activity;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import fhq.hcmute.modernshopping.ProjectUtil;
import fhq.hcmute.modernshopping.R;

/**
 * @author: Hien Nguyen Le
 * @emai: hien.nguyenle.it@gmail.com
 * 
 */
public class ProductDetails extends Fragment {
	private static ProductDetails instance = null;
	private WebView wv_ProductDetails = null;

	private ProductDetails() {

	}

	public static ProductDetails getProductDetails(Activity activity) {
		if (instance == null) {
			instance = new ProductDetails();
		}
		return instance;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View root = inflater.inflate(R.layout.fragment_product_details,
				container, false);
		wv_ProductDetails = (WebView) root
				.findViewById(R.id.wv_product_details);
		wv_ProductDetails
				.loadUrl(ProjectUtil.WEB_SERVICE_LINK+"ProductDescription.aspx?ProductCode=10023");
		return root;
	}
	
	public static void destroyInstance() {
		ProductDetails.instance = null;
	}
}
